import { createApp } from 'vue';
import App from './App.vue';

const app = createApp(App);

// 引入路由文件
import router from './router';

// 引入vuex
import store from './store';

// 注册所有图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue';

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
};

// 引入iconfont动态图标库
import {
	IconfontUrlCss,
	IconfontVersion,
	loadStyle
} from '@/assets/iconfont/config.js';
IconfontVersion.forEach((item)=>{
    loadStyle(IconfontUrlCss.replace("$key",item));
});

app.use(store).use(router).mount('#app');
